home *** CD-ROM | disk | FTP | other *** search
- void append_extension(char * string, char * extension, boolean override)
- {
- char *point;
- char *delimiter;
-
- point = strrchr(string, '.');
- delimiter = strrchr(string, '\\');
-
- if (point == NULL ||
- (point != NULL && point < delimiter)) {
- strcat(string, ".");
- strcat(string, extension);
- }
- else {
- if (*(point+1) == '\0' || override) {
- *point = '\0';
- strcat(string, ".");
- strcat(string, extension);
- }
- }
- }
-
-
-
- /*---------------------------*/
- /* cround */
- /*---------------------------*/
- LONG cround(double x)
-
- {
- if (x < 0.0)
- return((LONG)(x-0.5));
- return((LONG)(x+0.5));
- }
-